{
 "cells": [
  {
   "cell_type": "markdown",
   "source": [
    "## 1.4 运算和通用函数"
   ],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "### 1.算术运算"
   ],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:09.759958Z",
     "end_time": "2024-05-07T18:39:09.824671Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": "[3, 60, 84, 111, 54, 168]"
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lst = [1, 20, 28, 37, 18, 56]\n",
    "[i * 3 for i in lst]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "outputs": [
    {
     "data": {
      "text/plain": "array([  3,  60,  84, 111,  54, 168])"
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "\n",
    "a = np.array(lst)\n",
    "a * 3"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:09.780677Z",
     "end_time": "2024-05-07T18:39:09.912728Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "outputs": [
    {
     "data": {
      "text/plain": "array([[0, 1, 2, 3, 4],\n       [5, 6, 7, 8, 9]])"
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a = np.arange(10).reshape(2, 5)\n",
    "a"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:09.916506Z",
     "end_time": "2024-05-07T18:39:09.932795Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "outputs": [
    {
     "data": {
      "text/plain": "array([[10, 11, 12, 13, 14],\n       [15, 16, 17, 18, 19]])"
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "b = a + 10\n",
    "b"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:09.937105Z",
     "end_time": "2024-05-07T18:39:09.973876Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "outputs": [
    {
     "data": {
      "text/plain": "array([[-10,  -9,  -8,  -7,  -6],\n       [ -5,  -4,  -3,  -2,  -1]])"
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a - 10"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:09.962445Z",
     "end_time": "2024-05-07T18:39:09.973876Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "outputs": [
    {
     "data": {
      "text/plain": "array([[0. , 0.1, 0.2, 0.3, 0.4],\n       [0.5, 0.6, 0.7, 0.8, 0.9]])"
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a / 10"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:09.972983Z",
     "end_time": "2024-05-07T18:39:09.990095Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "outputs": [
    {
     "data": {
      "text/plain": "True"
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a.shape == b.shape"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:09.990095Z",
     "end_time": "2024-05-07T18:39:10.006093Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "outputs": [
    {
     "data": {
      "text/plain": "array([[10, 12, 14, 16, 18],\n       [20, 22, 24, 26, 28]])"
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a + b"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.009163Z",
     "end_time": "2024-05-07T18:39:10.054834Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "outputs": [
    {
     "data": {
      "text/plain": "array([[-10, -10, -10, -10, -10],\n       [-10, -10, -10, -10, -10]])"
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a - b"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.030567Z",
     "end_time": "2024-05-07T18:39:10.054834Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "outputs": [
    {
     "data": {
      "text/plain": "array([[  0,  11,  24,  39,  56],\n       [ 75,  96, 119, 144, 171]])"
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a * b"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.036857Z",
     "end_time": "2024-05-07T18:39:10.054834Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "outputs": [
    {
     "data": {
      "text/plain": "array([[0.        , 0.09090909, 0.16666667, 0.23076923, 0.28571429],\n       [0.33333333, 0.375     , 0.41176471, 0.44444444, 0.47368421]])"
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a / b"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.054834Z",
     "end_time": "2024-05-07T18:39:10.076842Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "outputs": [
    {
     "data": {
      "text/plain": "array([0, 1, 2, 3, 4])"
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m = np.arange(5)\n",
    "m"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.075849Z",
     "end_time": "2024-05-07T18:39:10.122194Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "outputs": [
    {
     "data": {
      "text/plain": "array([[ 0,  2,  4,  6,  8],\n       [ 5,  7,  9, 11, 13]])"
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a + m"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.097970Z",
     "end_time": "2024-05-07T18:39:10.122194Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "outputs": [
    {
     "data": {
      "text/plain": "array([[1],\n       [2]])"
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "n = np.arange(1, 3).reshape(-1, 1)\n",
    "n"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.106637Z",
     "end_time": "2024-05-07T18:39:10.122194Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "outputs": [
    {
     "data": {
      "text/plain": "array([[ 1,  2,  3,  4,  5],\n       [ 7,  8,  9, 10, 11]])"
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a + n"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.117286Z",
     "end_time": "2024-05-07T18:39:10.139632Z"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "### 2.比较运算和逻辑运算"
   ],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "outputs": [
    {
     "data": {
      "text/plain": "array([False, False,  True])"
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.array([6, 4, 3]) > np.array([9, 5, 1])"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.137836Z",
     "end_time": "2024-05-07T18:39:10.193132Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "outputs": [
    {
     "data": {
      "text/plain": "array([ True,  True])"
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.logical_or(np.array([False, True]), np.array([True, False]))"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.161296Z",
     "end_time": "2024-05-07T18:39:10.193132Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "outputs": [
    {
     "data": {
      "text/plain": "False"
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x = 3\n",
    "y = 5\n",
    "x < y and x > y"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.170382Z",
     "end_time": "2024-05-07T18:39:10.193132Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "outputs": [
    {
     "data": {
      "text/plain": "True"
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a = np.array([3, 6, 9])\n",
    "b = np.array([4, 5, 8])\n",
    "np.any(a < b) and np.any(a > b)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.175451Z",
     "end_time": "2024-05-07T18:39:10.193132Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "outputs": [
    {
     "data": {
      "text/plain": "False"
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.all(a < b)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.189178Z",
     "end_time": "2024-05-07T18:39:10.212823Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "outputs": [
    {
     "data": {
      "text/plain": "False"
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(a < b).all()"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.214311Z",
     "end_time": "2024-05-07T18:39:10.286204Z"
    }
   }
  },
  {
   "cell_type": "markdown",
   "source": [
    "### 3.通用函数"
   ],
   "metadata": {
    "collapsed": false
   }
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "outputs": [
    {
     "data": {
      "text/plain": "array([-0.   , -0.588, -0.951, -0.951, -0.588,  0.   ,  0.588,  0.951,\n        0.951,  0.588,  0.   ])"
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "alpha = np.linspace(-1, 1, 11)\n",
    "y = np.sin(np.pi * alpha)\n",
    "np.round(y, decimals=3)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.233169Z",
     "end_time": "2024-05-07T18:39:10.318294Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "outputs": [
    {
     "data": {
      "text/plain": "(array([3, 6, 9]), array([4, 5, 8]))"
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a, b"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.256548Z",
     "end_time": "2024-05-07T18:39:10.323914Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "outputs": [
    {
     "data": {
      "text/plain": "array([ 7, 11, 17])"
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.add(a, b)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.282236Z",
     "end_time": "2024-05-07T18:39:10.323914Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "outputs": [
    {
     "data": {
      "text/plain": "array([1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.])"
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.add(np.power(np.sin(alpha), 2), np.power(np.cos(alpha), 2))"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.302481Z",
     "end_time": "2024-05-07T18:39:10.381731Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "outputs": [
    {
     "data": {
      "text/plain": "array([1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.])"
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.sin(alpha) ** 2 + np.cos(alpha) ** 2"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.322923Z",
     "end_time": "2024-05-07T18:39:10.382646Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "outputs": [
    {
     "data": {
      "text/plain": "(dtype('float64'), dtype('float64'), dtype('float64'))"
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a = np.arange(10.0, 100.0, 2)\n",
    "b = np.logspace(2, 4, a.shape[0])\n",
    "m = np.empty_like(a)\n",
    "a.dtype, b.dtype, m.dtype"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.338256Z",
     "end_time": "2024-05-07T18:39:10.382646Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "outputs": [
    {
     "data": {
      "text/plain": "array([ 0.        ,  3.03363182, 11.28467394,  8.88745095,  7.9911083 ,\n        8.76124758, 11.38174229, 16.05675382, 23.01297001,  4.50209057,\n       14.80358684, 28.22776602, 11.11917342, 29.86037025, 14.87612811,\n        0.63808631, 29.66992312, 20.55309755, 13.93322466, 10.52715427,\n       11.13083079, 16.62802021, 28.        , 46.33631817, 14.84673944,\n       48.87450954, 31.91108295, 23.61247579, 25.81742286, 40.56753822,\n        0.12970008, 45.02090568, 36.03586844, 46.27766017,  1.19173422,\n       58.60370255, 64.76128108, 18.38086306,  4.69923121, 29.53097555,\n        9.33224658, 37.27154266, 27.3083079 , 78.28020211,  4.        ])"
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.remainder(b, a, out=m)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.347208Z",
     "end_time": "2024-05-07T18:39:10.382646Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "outputs": [
    {
     "data": {
      "text/plain": "array([ 0.        ,  3.03363182, 11.28467394,  8.88745095,  7.9911083 ,\n        8.76124758, 11.38174229, 16.05675382, 23.01297001,  4.50209057,\n       14.80358684, 28.22776602, 11.11917342, 29.86037025, 14.87612811,\n        0.63808631, 29.66992312, 20.55309755, 13.93322466, 10.52715427,\n       11.13083079, 16.62802021, 28.        , 46.33631817, 14.84673944,\n       48.87450954, 31.91108295, 23.61247579, 25.81742286, 40.56753822,\n        0.12970008, 45.02090568, 36.03586844, 46.27766017,  1.19173422,\n       58.60370255, 64.76128108, 18.38086306,  4.69923121, 29.53097555,\n        9.33224658, 37.27154266, 27.3083079 , 78.28020211,  4.        ])"
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.356998Z",
     "end_time": "2024-05-07T18:39:10.382646Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "outputs": [
    {
     "data": {
      "text/plain": "0"
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def bmi(height, weight):\n",
    "    bmi_index = weight / height ** 2\n",
    "    if 18 < bmi_index < 25:\n",
    "        return 0\n",
    "    elif bmi_index <= 18:\n",
    "        return -1\n",
    "    else:\n",
    "        return 1\n",
    "\n",
    "\n",
    "bmi(1.55, 45)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.381731Z",
     "end_time": "2024-05-07T18:39:10.397861Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "outputs": [],
   "source": [
    "h = (2.2 - 1.4) * np.random.random_sample((10,)) + 1.4\n",
    "h = np.round(h, 2)\n",
    "w = (96 - 30) * np.random.random_sample((10,)) + 30\n",
    "w = np.round(w, 2)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.399983Z",
     "end_time": "2024-05-07T18:39:10.451763Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "outputs": [
    {
     "data": {
      "text/plain": "array([ 0, -1,  0,  1,  1,  1, -1, -1, -1,  0])"
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.array([bmi(h[i], w[i]) for i in range(len(h))])"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.419814Z",
     "end_time": "2024-05-07T18:39:10.451763Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "outputs": [
    {
     "data": {
      "text/plain": "array([0, -1, 0, 1, 1, 1, -1, -1, -1, 0], dtype=object)"
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bmi_ufunc = np.frompyfunc(bmi, 2, 1)\n",
    "bmi_ufunc(h, w)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.429651Z",
     "end_time": "2024-05-07T18:39:10.451763Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "outputs": [
    {
     "data": {
      "text/plain": "array([1, 1, 4, 27, 256, 3125, 46656, 823543, 16777216, 387420489],\n      dtype=object)"
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pow_ufunc = np.frompyfunc(pow, 2, 1)\n",
    "a = np.arange(10)\n",
    "pow_ufunc(a, a)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.445188Z",
     "end_time": "2024-05-07T18:39:10.475709Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "outputs": [
    {
     "data": {
      "text/plain": "array([        1,         1,         4,        27,       256,      3125,\n           46656,    823543,  16777216, 387420489])"
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a ** a"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.472322Z",
     "end_time": "2024-05-07T18:39:10.515563Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "outputs": [
    {
     "data": {
      "text/plain": "array([ 0., -1.,  0.,  1.,  1.,  1., -1., -1., -1.,  0.], dtype=float32)"
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bmi_ufunc2 = np.vectorize(bmi, otypes=[np.float32])\n",
    "bmi_ufunc2(h, w)"
   ],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.499697Z",
     "end_time": "2024-05-07T18:39:10.515563Z"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "ExecuteTime": {
     "start_time": "2024-05-07T18:39:10.507197Z",
     "end_time": "2024-05-07T18:39:10.515563Z"
    }
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
